<?php
use \PsiFramework\Classes\Util\UI\Printer;
use \PsiFramework\Classes\Util\UI\HTML;
use \PsiFramework\Classes\Util\Log\Logger;

$user = $response->getAttribute("user");
?>
<div>
    <h3>
        <?php Printer::display($languageManager->getText('INVOICE_INFORMATION')); ?>
    </h3>
    <p>
        <?php Printer::display($languageManager->getText('INVOICE_INFORMATION_TEXT')); ?>
    </p>
    <form
        id="billingForm"
        action="<?php Printer::display(HTML::linkHref('action=AjaxSaveBillingInfo'));?>"
        method="POST"
        enctype="multipart/form-data">
        <input
            type="hidden"
            name="id"
            value="<?php Printer::display($user->getId()); ?>" />
        <fieldset class="typeLeft label required">
            <label for="lastNameBox" class="user">
                <?php Printer::display($languageManager->getText("LAST_NAME")); ?> : 
            </label>
            <input
                class="firstInput user"
                type="text"
                name="lastName"
                id="lastNameBox"
                value="<?php if ($user!=null && $user->getSurName() != null) Printer::display($user->getSurName()); ?>"
                required="required" />
        </fieldset>
        <fieldset class="typeLeft label required">
            <label for="firstNameBox" class="user">
                <?php Printer::display($languageManager->getText("FIRST_NAME")); ?> : 
            </label>
            <input
                class="firstInput user"
                type="text"
                name="firstName"
                id="firstNameBox"
                value="<?php if ($user!=null && $user->getFirstName() != null) Printer::display($user->getFirstName()); ?>"
                required="required" />
        </fieldset>
        <fieldset class="typeLeft label required">
            <label for="addressBox" class="user">
                <?php Printer::display($languageManager->getText("ADDRESS")); ?> : 
            </label>
            <input
                class="firstInput user"
                type="text"
                name="address"
                id="addressBox"
                value="<?php if ($user!=null && $user->getAddress() != null) Printer::display($user->getAddress()); ?>"
                required="required" />
        </fieldset>
        <fieldset class="typeLeft label required">
            <label for="zipBox" class="user">
                <?php Printer::display($languageManager->getText("ZIP_CODE")); ?> : 
            </label>
            <input
                class="firstInput user"
                type="text"
                name="zipCode"
                id="zipBox"
                value="<?php if ($user!=null && $user->getZipCode() != null) Printer::display($user->getZipCode()); ?>"
                required="required" />
        </fieldset>
        <fieldset class="typeLeft label required">
            <label for="cityBox" class="user">
                <?php Printer::display($languageManager->getText("CITY")); ?> : 
            </label>
            <input
                class="firstInput user"
                type="text"
                name="cityName"
                id="cityBox"
                value="<?php if ($user!=null && $user->getCityName() != null) Printer::display($user->getCityName()); ?>"
                required="required" />
        </fieldset>
        <fieldset class="floatRight">
            <input
                type="submit"
                name="inscription"
                value="<?php Printer::display($languageManager->getText('SAVE_MODIFICATIONS')); ?>">
        </fieldset>
    </form>
</div>